package com.ljs.service.impl;

import com.ljs.entity.User;
import com.ljs.respository.UserMapper;
import com.ljs.service.UserService;
import org.springframework.stereotype.Service;

import javax.annotation.Resource;
import java.util.List;
@Service
public class UserServiceImpl implements UserService {
    @Resource
    UserMapper userMapper;
    @Override
    public List<User> selUser(int  index,int limit) {
        return userMapper.selUser(index,limit);
    }

    @Override
    public User selbyname(String username) {

        return userMapper.selbyname(username);
    }

    @Override
    public User selbyid(int id) {
        return userMapper.selbyid(id);
    }

    @Override
    public boolean add(User user) {
        return userMapper.add(user);
    }

    @Override
    public boolean update(User user) {
        return userMapper.update(user);
    }

    @Override
    public boolean delete(int id) {
        return userMapper.delete(id);
    }

    @Override
    public int count() {
        return userMapper.count();
    }
}
